# source this file to have the listed variables available in the screen config
# usage: source export.sh <config file>

config=$1

echo "Exporting config: $config ...."
source $config

# export test name
export SGNL_TEST_NAME=$test_name

# export initiator, responder etc for screen
export SGNL_INITIATOR=$initiator
export SGNL_RESPONDER=$responder
export SGNL_MBOX=${mbox1}
export SGNL_MBOX2=${mbox2}

echo "   Inititator: $SGNL_INITIATOR, Responder: $SGNL_RESPONDER, Middlebox: $SGNL_MBOX,  Middlebox 2: $SGNL_MBOX2"

export SGNL_INITIATOR_PORT=$initiator_port
export SGNL_RESPONDER_PORT=$responder_port
export SGNL_MBOX1_PORT=$mbox1_port
export SGNL_MBOX2_PORT=$mbox2_port

export SGNL_INITIATOR_HIT=$initiator_hit
export SGNL_RESPONDER_HIT=$responder_hit

echo "   Inititator HIT: $SGNL_INITIATOR_HIT"
echo "   Responder  HIT: $SGNL_RESPONDER_HIT"

# export path to binaries
export SGNL_HIPD=$hipldir_remote/hipd
export SGNL_HIPFW=$hipldir_remote/hipfw

# export options
export SGNL_HIPD_OPTIONS=$hipd_options
export SGNL_HIPFW_OPTIONS=$hipfw_options
export SGNL_HIPFW_MBOX_OPTIONS=$hipfw_mbox_options
export SGNL_HIPFW_MBOX2_OPTIONS=$hipfw_mbox2_options

echo "   HIPD  at $SGNL_HIPD   with options: $SGNL_HIPD_OPTIONS"
echo "   HIPFW at $SGNL_HIPFW  with options: $SGNL_HIPFW_OPTIONS / $SGNL_HIPFW_MBOX_OPTIONS / $SGNL_HIPFW_MBOX2_OPTIONS"

# export timeouts
export SGNL_STARTUP_TIMEOUT=$startup_timeout
echo "   Startup timeout: $SGNL_STARTUP_TIMEOUT"

# export some util scripts
export SGNL_RUN="$PWD/setup.sh"
export SGNL_SETUP="$PWD/setup.sh"
export SGNL_KILL="$PWD/kill.sh"
export SGNL_CLEANUP="$PWD/cleanup.sh"

# export some test specific stuff
export SGNL_UPDATES=$sgnl_updates

echo "... done exporting config."
